/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 menus.hh                                                  VLC Gtkmmm gui module
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 Copyright © 2006-2008 the VideoLAN team

 Authors: David GUGLIELMI <raxxx.fr@gmail.com>
          David LARROQUE <david.larroque@gmail.com>

 This program is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free Software
 Foundation; either version 2 of the License, or (at your option) any later
 version.

 This program is distributed in the hope that it will be useful, but WITHOUT ANY
 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 PARTICULAR PURPOSE. See the GNU General Public License for more details.

 You should have received a copy of the GNU General Public License along with
 this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
 Street, Fifth Floor, Boston MA 02110-1301, USA.
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/

#ifndef __MENU_HH_
#define __MENU_HH_

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "gtkmm.hh"

#include <gtkmm/menubar.h>
#include <gtkmm/menuitem.h>
#include <gtkmm/window.h>

#include <vector>

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
class GVLCMenu
{

public:

  static Gtk::MenuBar*  create_menu_bar (Gtk::Window*, intf_thread_t*);

  // MenuBar items - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  static Gtk::MenuItem* file_menu (Gtk::Window*);
  static Gtk::MenuItem* playlist_menu (Gtk::Window*, intf_thread_t*);
  static Gtk::MenuItem* tools_menu (Gtk::Window*, intf_thread_t*);
  static Gtk::MenuItem* audio_menu (intf_thread_t*);
  static Gtk::MenuItem* video_menu (intf_thread_t*);
  static Gtk::MenuItem* playback_menu (Gtk::Window*, intf_thread_t*);
  static Gtk::MenuItem* help_menu (Gtk::Window*);

  // Submenu items - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  static Gtk::MenuItem* tools_interfaces_submenu (intf_thread_t*);
  static Gtk::MenuItem* playlist_sd_submenu (intf_thread_t*);

private:
  // MenuBar functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  static void populate (intf_thread_t*, Gtk::Menu *,\
                        std::vector<const char*>&, std::vector<int>&);
  static bool is_menu_empty (const char *, vlc_object_t *, bool);
  static void update_item (intf_thread_t*, Gtk::Menu *, const char *,\
                             vlc_object_t *, bool);
  static int  create_choices_menu (Gtk::Menu *, const char *,\
                                    vlc_object_t *, bool b_root = false);
  static void create_and_connect (Gtk::Menu *, const char *, Glib::ustring,\
                                    Glib::ustring, int, int, vlc_value_t, int,
                                    bool checked = false);
};
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#endif /* __MENU_HH_ */
